This is the circuitry inside a cheap USB two cell charger. Before I opened it I tried to guess what circuitry was inside, but it was a lot more complicated than I was expecting. Not helped by the use of a PNP transistor as a current regulator. At first I thought it was a clever design compared to mine, but latterly I think my much simpler version was a lot better. Especially as regards to the possibility of back feeding from the cells into the USB port.